package com.clementheliou.cheliou.business.dataaccess.mark;

import java.util.List;

import com.clementheliou.cheliou.dal.model.mark.Mark;

/**
 * Service used to access the marks of the model's layer.
 * 
 * @author Clément HELIOU (clement.heliou@gmail.com)
 * @since 1.0
 */
public interface MarkDataAccessService {

	/**
	 * Persists the given mark.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @param markToBeAdded the marks to be persisted.
	 * @since 1.0
	 */
	void addMark(final Mark markToBeAdded);

	/**
	 * Gets the the mark given by a member for a given photo.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @param photoId the marked photo's id.
	 * @param memberId the member's id.
	 * @return the resulting mark or <tt>null</tt> if the given photo has not
	 *         yet been marked by this member.
	 * @since 1.0
	 */
	Mark getMarkOfMember(final Integer photoId, final Integer memberId);

	/**
	 * Gets all marks values of the given photo.
	 * 
	 * @author Clément HELIOU (clement.heliou@gmail.com)
	 * @param photoId the photo's id.
	 * @return the resulting mark's values list.
	 * @since 1.0
	 */
	List<Integer> getMarksOfPhoto(final Integer photoId);

}
